package com.youyu.core.common.excel;

/**
 * <p>Author:  dengxj</p>
 * <p>Date: 2016/7/7 16:48</p>
 * <p>Description:excel单个格对象</p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company: yihu.com</p>
 */
public class DataCell {

    // 小数（小数后2位）
	public static final int DATA_TYPE_NUMERIC = 0;
    // 文本
	public static final int DATA_TYPE_TEXT = 1;
    // 空白
	public static final int DATA_TYPE_BLANK = 3;
    // 日期
	public static final int DATA_TYPE_DATE = 5;
    // 日期
	public static final int DATA_TYPE_DATETIME = 6;
    // 整数
	public static final int DATA_TYPE_INTEGER = 7;

    //内容
	private String content;
    //类型
	private int type;
	//跨列数
	protected int colSpan;
	//跨行数
	protected int rowSpan;

	public DataCell(String content) {
		this(content, DATA_TYPE_TEXT);
	}

	public DataCell(String content, int type) {
		this.content = content;
		this.type = type;
	}

	public DataCell() {

	}

	public String getContent() {
		return content;
	}

	public void setContent(String _content) {
		if (_content == null) {
			_content = "";
		}
		this.content = _content;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getColSpan() {
		return colSpan;
	}

	public void setColSpan(int colSpan) {
		this.colSpan = colSpan;
	}

	public int getRowSpan() {
		return rowSpan;
	}

	public void setRowSpan(int rowSpan) {
		this.rowSpan = rowSpan;
	}
}
